﻿using System;
using System.Collections.Generic;
using Autodesk.Revit.DB;

namespace YJKRevitCode.ElmentSearchUtility
{
	public static class ElementSearchMethod
	{
		public static List<Element> GetInsectionElementByDoc(Autodesk.Revit.DB.Document doc, Solid solid)
		{
			new List<int>();
			FilteredElementCollector filteredElementCollector = new FilteredElementCollector(doc);
			ElementIntersectsSolidFilter elementIntersectsSolidFilter = new ElementIntersectsSolidFilter(solid);
			IList<Element> list = filteredElementCollector.WherePasses(elementIntersectsSolidFilter).ToElements();
			List<Element> list2 = new List<Element>();
			foreach (Element item in list)
			{
				list2.Add(item);
			}
			return list2;
		}
	}
}
